<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>sgp4oo: Fichero Fuente Main.cpp</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generado por Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Página&nbsp;principal</span></a></li>
      <li><a href="annotated.html"><span>Clases</span></a></li>
      <li class="current"><a href="files.html"><span>Archivos</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;archivos</span></a></li>
      <li><a href="globals.html"><span>Miembros&nbsp;de&nbsp;los&nbsp;ficheros</span></a></li>
    </ul>
  </div>
<h1>Main.cpp</h1><a href="_main_8cpp.html">Ir a la documentación de este archivo.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;cppunit/BriefTestProgressListener.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;cppunit/CompilerOutputter.h&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;cppunit/extensions/TestFactoryRegistry.h&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;cppunit/TestResult.h&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;cppunit/TestResultCollector.h&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;cppunit/TestRunner.h&gt;</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 
<a name="l00009"></a><a class="code" href="_main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">00009</a> <span class="keywordtype">int</span> <a class="code" href="_main_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">main</a>( <span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[] )
<a name="l00010"></a>00010 {
<a name="l00011"></a>00011   <span class="comment">// Create the event manager and test controller</span>
<a name="l00012"></a>00012   CPPUNIT_NS::TestResult controller;
<a name="l00013"></a>00013 
<a name="l00014"></a>00014   <span class="comment">// Add a listener that colllects test result</span>
<a name="l00015"></a>00015   CPPUNIT_NS::TestResultCollector result;
<a name="l00016"></a>00016   controller.addListener( &amp;result );        
<a name="l00017"></a>00017 
<a name="l00018"></a>00018   <span class="comment">// Add a listener that print dots as test run.</span>
<a name="l00019"></a>00019   CPPUNIT_NS::BriefTestProgressListener progress;
<a name="l00020"></a>00020   controller.addListener( &amp;progress );      
<a name="l00021"></a>00021 
<a name="l00022"></a>00022   <span class="comment">// Add the top suite to the test runner</span>
<a name="l00023"></a>00023   CPPUNIT_NS::TestRunner runner;
<a name="l00024"></a>00024   runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
<a name="l00025"></a>00025   runner.run( controller );
<a name="l00026"></a>00026 
<a name="l00027"></a>00027   <span class="comment">// Print test in a compiler compatible format.</span>
<a name="l00028"></a>00028   CPPUNIT_NS::CompilerOutputter outputter( &amp;result, CPPUNIT_NS::stdCOut() );
<a name="l00029"></a>00029   outputter.write(); 
<a name="l00030"></a>00030 
<a name="l00031"></a>00031   <span class="keywordflow">return</span> result.wasSuccessful() ? 0 : 1;
<a name="l00032"></a>00032 }
<a name="l00033"></a>00033 
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generado el Tue May 22 09:43:43 2012 para sgp4oo por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
